-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RNMobile] Audio & Video block - Autoplay BottomSheet Cell help support #30885
Conversation
Size Change: +3 B (0%) Total Size: 1.3 MB
ℹ️ View Unchanged
|
Hi @iamthomasbishop I need some design feedback based on the proposal you had shared with me here.
|
@jd-alexander Looking good, thanks for the ping!
I mean "ideally" I'd prefer to see this cell at the bottom because it's the only row with a note attached, but I understand what you're saying and agree it's not worth diverging in this case. So if we're unable to move the cell, I'm fine with shipping this as-is. Moving forward, it might be worth proposing a more condensed version of the label for all platforms to use, which if accepted, we would simply inherit without additional work. I'm open to any ideas, but here are a few suggestions for a more concise note (which could be used on a variety of blocks that contain autoplay functionality):
Let me know if you have any thoughts, but feel free to 🚢 this one and we can proceed if need be with the label changes separately. 👏 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jd-alexander Looked over the code and tested on Android and iOS and all runs smoothly. I left one code comment for your review -- more of a question for me. I also noticed that the bottom margin below the help text do not match the bottom margins for settings options that do not have help text. I'm wondering if it needs to be slightly increased to give a more uniform looks to settings?
I also verified the web version as well for Audio and Video blocks. Neither shows the help text unless the autoplay option is toggled. |
@jd-alexander one final comment. I tested on Android with Talkback and the help message never gets read by the screenreader. Maybe the message could be read as part of the screencapture-1618867210853.mp4 |
No prob @iamthomasbishop I will keep it as is 👍🏾
I think this is one is a good approach! I will make the necessary updates.
Will do 🙇🏾 |
Thanks for spotting this @AmandaRiu working on the changes to make the margins unified.
Good idea! I am working on changing how the accessibility labels are generated. Currently, logic for this lives with the |
What I am working on accomplishing, is logic that allows the appropriate labels to generate when the help text is available or not without too many duplications of the |
@iamthomasbishop web and mobile now has one string for all platforms 29b4393 Web
Mobile
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ceyhun I am going to be updating the PR with accessibility improvements for @AmandaRiu to review. Thanks for the review 🙇🏾 |
Hi @AmandaRiu I implemented the accessibility improvements that were requested. Let me know what you think. TestingSwitch cellNote The switch cell implements a different mechanism for generating its accessibility label that includes the toggled state in the label. Steps
CellPrerequisite you can add
Steps
ConcernsThe main thing I noticed was that the generated label read by VoiceOver/TalkBack contains an extra full stop at the end because the text has its own full stop and we also include it in the string template being utilized. It seems fine because it doesn't impact the announcement but I am just bringing it up nonetheless. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jd-alexander LGTM! Nice work!
Thanks for the review @AmandaRiu 😄 |
@hypest I haven't been able to get this PR merged because I think the current Unit Tests/ PHP are flaky. I have done several re-runs today. The changes here did not touch anything PHP or theme-related so I am thinking that the failure has nothing to do with my changes. |
Thanks for the ping Joel! I verified that the failed "Unit tests /PHP (pull_request)" is failing with the same failures on current trunk (commit 29078b0) so, I will go ahead and admin-merge this PR 👍 |
Why was this merged with failing tests? It's not because it's trunk is failing that that's ok? |
👋 @ellatrix ! No other reason than that actually. It was clear that this PR wasn't introducing the failures and there were no other failures besides those already in trunk. Went ahead with merging to move the native mobile side forward since the particular PHP failures do not block native mobile. Happy to revise the practice though (merging if PR is dimmed irrelevant to the CI failures) if it's understood that all PRs should block if CI is red. Also, in this particular case, not sure, has this PR caused some regression perhaps? More than happy to dive in or revert if is has introduced regressions 👍 |
Gutenberg Mobile PR wordpress-mobile/gutenberg-mobile#3380
Description
This PR introduces
help
behavior that exists on the web, to nativeBottomSheet
Cell components. This change arose from the need to inform users of the usability implications that may be experienced by users if theautoplay
attribute is enabled on the Audio and Video block.How has this been tested?
Audio block
Autoplay
attribute has the help text below it.Video block
Autoplay
attribute has the help text below it.Regression Testing - Web
npm run wp-env start
help
text only gets shown when theautoplay
attribute is checked.Types of changes
From an implementation standpoint, the changes are as follows:
ToggleControl
of the native Audio block now contains the help text ofNote: Autoplaying audio may cause usability issues for some visitors.
BottomSheet
Cell in native, was extended to support thehelp
text, so that thetoggle-control
would behave as expected when thehelp
prop is passed. A side effect of this change is that all components that inheritCell
such ascycle-select-control
,range-control
,select-control
,text-control
,textarea-control
are able to utilize the behavior.Checklist:
*.native.js
files for terms that need renaming or removal).